home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 007a / cug315.zip / MOUSELIB.H < prev    next >
C/C++ Source or Header  |  1990-05-16  |  2KB  |  46 lines

  1.  
  2. /* declarations to support mouse_clear() and mouse_response() added */
  3. /* 3/89 by T. Clune. */
  4.  
  5. /* declarations for button_clicks() added 11/88 by T Clune */
  6.  
  7. /* declaration of microsoft mouses() function and the three mouse.lib */
  8. /* function front ends in mouselib.c.  The struct variables are equivalent */
  9. /* to the Microsoft mouse users' guide variables, m1, m2, m3 and m4. */
  10. /* By T. Clune, 12/87 */
  11.  
  12. #ifndef MOUSELIB_H
  13. #define MOUSELIB_H
  14.  
  15.  
  16. #define LEFT_BUTTON 1  /* left button press status value from func 3 */
  17. #define RIGHT_BUTTON 2     /* right button press */
  18. #define BOTH_BUTTONS 3      /* both buttons press */
  19.  
  20. #define LEFT_BUTTON_IN 127  /* value returned by inpause() left button */
  21.                 /* or both buttons press */
  22.  
  23. #define MOUSE_CHECK 0       /* function 0 of Microsoft mouse.lib */
  24. #define BUTTON_STATUS 3     /* function 3 = Button check */
  25. #define BUTTON_CLICKS 5     /* function 5= number of times button pressed */
  26.                 /* since last call to function 5 */
  27. #define POS_CHANGE  11      /* function 11 = mouse motion counter values */
  28.  
  29. #define MOTION_FACTOR 3 /* mouse must move 3 in x or y dir to count as moving */
  30.  
  31. typedef struct
  32. {
  33.     int opcode;  /* the function number variable */
  34.     int status;   /* the button-press status variable for function 3 */
  35.     int dx;     /* with call 11 (mpos_read()), dx & dy return change in x */
  36.     int dy;     /* or y position since last call. */
  37. } mstruc;
  38.  
  39.  
  40. void mouse_clear();
  41. int inpause();
  42. char *mouse_gets();
  43. mstruc m_install(), button_read(), mdpos_read(), button_clicks(), mouse_response();
  44.  
  45. #endif
  46.